import { YN_SELECT_LIST, METAL_SELECT_LIST } from '@/pages/supplier/constants/common'
import { getInitialFieldsValue } from '@/pages/supplier/utils'

// 供应商管理 - 合格供应商
const FORM_ITEM_LIST = [
  { prop: 'supplierCode', label: '供应商代码', type: 'input', },
  { prop: 'supplierName', label: '供应商名称', type: 'input', },
  { prop: 'mainCategoryId', label: '主营品类', type: 'categorySelect', },
  { prop: 'mainProduct', label: '主营商品', type: 'input', },
  { prop: 'manageCategoryId', label: '经营品类', type: 'categorySelect', },
  { prop: 'supplierType', label: '供应商类型', type: 'select', clearable: true, sysDict: 10130, disabledValues: [1005, 1006, 1007, 1008, 1009, 1010] },
  { prop: 'managementAreaId', label: '供应商管理区域', type: 'managementArea' },
  { prop: 'centralPurchase', label: '是否集采', type: 'select', clearable: true, dict: 18 },
  { prop: 'belongDepartment', label: '供应商归属中心', type: 'select', clearable: true, dict: 233 },
  { prop: 'businessContact', label: '业务对接人', type: 'userSelect' },
  { prop: 'coordination', label: '是否线上协同', type: 'select', clearable: true, sysDict: 10040 },
  { prop: 'createUser', label: '创建人', type: 'input', },
  { prop: 'contractTime', label: '合同有效期', type: 'datePicker', },
  // { prop: 'contractClassify', label: '合同类别', type: 'select', clearable: true, dict: 259 },
  { prop: 'cooperativeType', label: '合作方式', type: 'select', clearable: true, dict: 13 },
  { prop: 'reconciliationDate', label: '对账日', type: 'select', clearable: true, dict: 263 },
  { prop: 'checkoutTime', label: '结账时间', type: 'select', clearable: true, sysDict: 15 },
  { prop: 'paidType', label: '付款方式', type: 'select', clearable: true, sysDict: 10131 },
  { prop: 'checkoutRange', label: '结账区间', type: 'select', clearable: true, sysDict: 10133 },
  { prop: 'settlementType', label: '结算方式', type: 'select', clearable: true, sysDict: 10173 },
  { prop: 'rollingPrepayment', label: '是否滚动预付', type: 'select', clearable: true, dict: 18 },
  { prop: 'centralizedSettle', label: '是否集中结账', type: 'select', clearable: true, dict: 18 },
  { prop: 'centralizedSettlePlace', label: '集中结账地', type: 'select', clearable: true, dict: 224 },
  { prop: 'acceptInvoice', label: '是否承兑', type: 'select', clearable: true, options: YN_SELECT_LIST.filter(i => !i.disabled) },
  { prop: 'rebate', label: '是否返利', type: 'select', clearable: true, dict: 18 },
  { prop: 'freightPayer', label: '运费承担方', type: 'select', clearable: true, sysDict: 10146 },
  { prop: 'arrivalTime', label: '到货时间', clearable: true, type: 'select', dict: 225 },
  { prop: 'cooperativeBrandId', label: '合作品牌', type: 'brandSelectOne' },
  { prop: 'invoiceType', label: '发票类型', type: 'select', sysDict: 521 },
  { prop: 'contractType', label: '合同类型', type: 'select', clearable: true, dict: 258 },
  { prop: 'accountPhone', label: '协同平台手机号', type: 'input', },
  { prop: 'rawMaterialOverFloatWarn', label: '是否预警', type: 'select', clearable: true, options: METAL_SELECT_LIST },
]
const INITIAL_FIELDS_VALUE = getInitialFieldsValue(FORM_ITEM_LIST)
export {
  INITIAL_FIELDS_VALUE,
  FORM_ITEM_LIST,
}
